package com.tk.ehr.controller;

import com.github.pagehelper.PageInfo;
import com.tk.ehr.model.entity.Employee;
import com.tk.ehr.service.EmployeeService;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/emp")
public class EmployController {

  @Resource
  private EmployeeService employeeService;

  @GetMapping("/page")
  public PageInfo<Employee> page(Integer pageNum, Integer pageSize) {
    return employeeService.page(pageNum, pageSize);
  }
}
